package com.story.story_serve.controller.Book;

import com.story.story_pojo.Book.BookCar;
import com.story.story_pojo.Book.BookCarList;
import com.story.story_serve.service.Book.BookCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * ClassName:  BookCarController
 * description:
 *
 * @ author:郭海龙
 * @ Create：2024/6/2 21:43
 * @ Version:1.0
 */
@RestController
public class BookCarController {

    @Autowired
    private BookCarService bookCarService;

    // 添加到书单
    @RequestMapping("/addBookCar")
    public String addCar(BookCar bookCar){
        return bookCarService.addBookcar(bookCar);
    }


    // 获取书单数据
    @RequestMapping("/getBookCarList")
    public List<BookCarList> getBookCarList(HttpSession session){
        return bookCarService.getBookCarList(session);
    }
}
